package exec

import "strconv"

type C uint

func (sc C) String() string {
	if int(sc) < len(scText) {
		return scText[sc]
	}
	return strconv.FormatUint(uint64(sc), 10)
}

const (
	None C = iota
	Ready
	Running
	Exited
)

var scText = [...]string{"none", "ready", "running", "exited"}

type Status struct {
	S      C
	Pid    int
	Exited bool
	Code   int
	Err    error
}
